/*******************************************************************************
 * Copyright (c) 2011 Olexandr V. Shaposhnikov.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Olexandr V. Shaposhnikov - initial API and implementation and/or initial documentation
 *******************************************************************************/
package com.funkyroach.use.plugin;

import org.eclipse.dltk.ui.CodeFormatterConstants;
import org.eclipse.dltk.ui.PreferenceConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;

import com.funkyroach.use.ui.text.USColorConstants;


public class USPreferenceConstants extends PreferenceConstants{

    private static final String EDITOR_STRING_COLOR = USColorConstants.US_STRING;
    private static final String EDITOR_KEYWORD_COLOR = USColorConstants.US_KEYWORD;
    private static final String EDITOR_NUMBER_COLOR = USColorConstants.US_NUMBER;
    private static final String EDITOR_CLASS_COLOR = USColorConstants.US_CLASS;
    private static final String EDITOR_COMMENT_COLOR = USColorConstants.US_COMMENT;
    private static final String EDITOR_MACROS = USColorConstants.US_MACROS;
    
    

    public static void initializeDefaultValues(IPreferenceStore store) {
        PreferenceConstants.initializeDefaultValues(store);
        PreferenceConverter.setDefault( store, EDITOR_COMMENT_COLOR, new RGB( 63, 127, 95 ) );
        PreferenceConverter.setDefault( store, EDITOR_STRING_COLOR, new RGB( 42, 0, 255 ) );        
        PreferenceConverter.setDefault( store, EDITOR_KEYWORD_COLOR, new RGB( 127, 0, 85 ) );
        PreferenceConverter.setDefault( store, EDITOR_NUMBER_COLOR, new RGB( 128, 0, 0 ) );
        PreferenceConverter.setDefault( store, EDITOR_CLASS_COLOR, new RGB( 255, 0, 0 ) );
        PreferenceConverter.setDefault( store, EDITOR_MACROS, new RGB( 255, 42, 255 ) );

        
        store.setDefault(PreferenceConstants.EDITOR_SMART_INDENT, true);
        store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS, true);
        store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACKETS, true);
        store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACES, true);
        store.setDefault(PreferenceConstants.EDITOR_SMART_TAB, true);
        store.setDefault(PreferenceConstants.EDITOR_SMART_PASTE, true);
        store.setDefault(PreferenceConstants.EDITOR_SMART_HOME_END, true);
        store.setDefault(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, true);
        store.setDefault(PreferenceConstants.EDITOR_TAB_WIDTH, 4);
        store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS, true);


        
        store.setDefault(PreferenceConstants.EDITOR_FOLDING_ENABLED, true);
        store.setDefault(PreferenceConstants.EDITOR_FOLDING_LINES_LIMIT, 2);
        store.setDefault(PreferenceConstants.EDITOR_COMMENTS_FOLDING_ENABLED,
                true);
        
        
        store.setDefault(PreferenceConstants.EDITOR_DOCS_FOLDING_ENABLED, true);
        store
                .setDefault(PreferenceConstants.EDITOR_FOLDING_INIT_COMMENTS,
                        true);


        store.setDefault(CodeFormatterConstants.FORMATTER_TAB_SIZE, 4);

        
    }

}
